package com.timer.taskRule.service.impl;

import com.timer.taskRule.entity.Permissions;
import com.timer.taskRule.entity.Role;
import com.timer.taskRule.entity.User;
import com.timer.taskRule.mapper.LoginMapper;
import com.timer.taskRule.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LoginServiceImpl implements LoginService {

	@Autowired
	private LoginMapper loginMapper;

	@Override
	public List<Role> findRoleList(String userName) {
		return loginMapper.findRoleList(userName);
	}

	@Override
	public List<Permissions> findPermissionsList(int roleId) {
		return loginMapper.findPermissionsList(roleId);
	}

	@Override
	public User findUser(String userName) {
		return loginMapper.findUser(userName);
	}
}
